package joe.works.pluginframework.support.nshandler;

import org.springframework.beans.factory.xml.NamespaceHandlerSupport;

public class PluginNamespaceHandler extends NamespaceHandlerSupport {
	public interface Elements {
		String PLUGIN_MANAGER = "pluginManager";
		String STRATEGY_PLUGIN = "strategy";
		String STRATEGY_EXTENTION_POINT_ANNOTATION_PROCESSOR = "strategyAnnotationProcessor";
	}

	@Override
	public void init() {
		registerBeanDefinitionParser(Elements.PLUGIN_MANAGER, new PluginManagerBeanDefinitionParser());
		registerBeanDefinitionParser(Elements.STRATEGY_PLUGIN, new StrategyPluginBeanDefinitionParser());
		registerBeanDefinitionParser(Elements.STRATEGY_EXTENTION_POINT_ANNOTATION_PROCESSOR, new StrategyAnnotationProcessorBeanDefinitionParser());
	}

}
